import express, { Router } from 'express';
import { authController } from '../controllers/authController';
import { asyncHandler } from '../middleware/asyncHandler';

const router: Router = express.Router();

// 登录
router.post('/login', asyncHandler(authController.login));

// 注册
router.post('/register', asyncHandler(authController.register));

// 注销
router.post('/logout', asyncHandler(authController.logout));

export default router;
